package org.jeecg.modules.rental.enums;

/**
 * 租赁配置枚举
 */
public enum RentalConfigEnums {

    VEHICLE_QRCODE_PREFIX("VEHICLE_QRCODE_PREFIX", "https://1000mi.cn/mp/lvcheng/rental", "车辆二维码前缀",  "微信小程序普通二维码"),

    CHARGE_QRCODE_PREFIX("CHARGE_QRCODE_PREFIX", "https://1000mi.cn/mp/lvcheng/charge", "插座二维码前缀",  "微信小程序普通二维码"),
    SERVICE_INTERFACE_ADDRESS("SERVICE_INTERFACE_ADDRESS", "https://1000mi.cn/jeecg-boot", "服务接口地址",""),
    STATIC_DOMAIN_URL("STATIC_DOMAIN_URL", "https://1000mi.cn/jeecg-boot/sys/common/static/", "静态资源地址",""),

    PROTOCOL_READING_DURATION("PROTOCOL_READING_DURATION", "10", "协议必读时长（秒）","协议须知等需要显示的时长，只有该时长后才可关闭"),

    USEABLE_PACKAGE_CATEGORY("USEABLE_PACKAGE_CATEGORY", "1", "套餐使用方式","1-还车后结束套餐, 2-还车后套餐有效期内仍可以取车");

    private String configKey;

    private String configValue;

    private String configName;

    private String remark;

    RentalConfigEnums(String configKey, String configValue, String configName, String remark) {
        this.configKey = configKey;
        this.configValue = configValue;
        this.configName = configName;
        this.remark = remark;
    }

    public String getConfigKey() {
        return configKey;
    }

    public String getConfigValue() {
        return configValue;
    }

    public String getConfigName() {
        return configName;
    }


    public String getRemark() {
        return remark;
    }

    public static RentalConfigEnums getEnumByValue(String value){
        for(RentalConfigEnums item: values()){
            if(value.equals(item.configValue)){
                return item;
            }
        }
        throw new RuntimeException("没找到对应字典");
    }

}
